<?php 
/* 
 * This file is part of TCDB. 
 * 
 * Copyright (C) 2000-2009 
 * Technology Consultant Corps 
 * Grinnell College 
 * Grinnell, IA, 50112 
 * tc@grinnell.edu 
 * 
 * TCDB is free software; you can redistribute it and/or modify 
 * it under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; either version 3 of the License, or 
 * (at your option) any later version. 
 * 
 * TCDB is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details. 
 * 
 * You should have received a copy of the GNU General Public License 
 * along with TCDB. If not, see <http://www.gnu.org/licenses/>. 
 * 
 
 ============================================================================= 
 
 * index.php -- Main page; displays current announcements and current
 *              scheduling information.
 *		If invoked with the logout parameter, clears cookie
 *              data, logging the user out
 * 
 * Author: Dylan J. Sather
 * Created: 2009-06-04 
 * Last edited: 2009-07-05
 * 
 * Thanks to Andrew Kensler for his work on index.php in January 2001
 */ 

// Start output buffering and includes
ob_start();
require "init.php";

$page_title = "Home";

require 'header.php';

/* If $_GET['logout'] is set to 1, clear session info and $_POST array */
if (isset($_GET['logout']) && $_GET['logout'] == 1) {
    $_SESSION = array();
    session_destroy(); 
    setcookie('PHPESSID', '', time()-3600, '/', '', 0, 0);
    $_POST = array();
}

require 'footer.php';

// Flush output buffer
ob_end_flush();

?>
